{template "mheader.html"}

<div class="portlet light ">
    <div class="portlet-title tabbable-line">
        <div class="caption">
            <span class="caption-subject"> 我的书架</span>
        </div>
    </div>
    <div class="portlet-body">

        <form class="form-horizontal" role="form" id="myform">
            {dr_form_hidden()}
            <ul class="feeds fc-checkable">
                {loop $list $t}
                <li>
                    <div class="col1">
                        <div class="cont">
                            <div class="cont-col1" style="padding-top:4px;padding-left:4px;">
                                <div class="mt-comment-select fc-checkable">
                                    <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                        <input type="checkbox" class="checkboxes" name="ids[]" value="{$t.id}" />
                                        <span></span>
                                    </label>
                                </div>
                            </div>
                            <div class="cont-col2">
                                <div class="desc">
                                    <a href="{$t.url}" target="_blank">
                                        {$t.title}
                                    </a>

                                    {if $t.read_url}
                                    <a style="color:red;" href="{$t.read_url}" target="_blank">
                                        继续阅读《{$t.read_name}》
                                    </a>
                                    {/if}

                                </div>
                            </div>
                        </div>
                    </div>
                </li>
                {/loop}
            </ul>

            <div class="mt-commets-checkable fc-checkable" style="padding-left:4px;padding-top:10px;">
                <label class="mt-table mt-checkbox mt-checkbox-single mt-checkbox-outline">
                    <input type="checkbox" class="group-checkable" data-set=".checkboxes" />
                    <span></span>
                </label>
                <label><button type="button" onclick="dr_ajax_option('{dr_member_url($uriprefix.'/delete')}', '{dr_lang('你确定要删除吗？')}', 1)" class="btn red btn-xs"> <i class="fa fa-trash"></i> 删除 </button></label>
            </div>
        </form>
        {if $mypages}
        <div class="fc-pages text-center">{$mypages}</div>
        {/if}
    </div>
</div>
<script>
    $(function() {
        var table = $('.fc-checkable');
        table.find('.group-checkable').change(function () {
            var set = jQuery(this).attr("data-set");
            var checked = jQuery(this).is(":checked");
            jQuery(set).each(function () {
                if (checked) {
                    $(this).prop("checked", true);
                    $(this).parents('div').addClass("active");
                } else {
                    $(this).prop("checked", false);
                    $(this).parents('div').removeClass("active");
                }
            });
        });
    });
</script>
{template "mfooter.html"}